package com.microservice.microservicemovie.client.feign;


import com.microservice.config.FeignConfiguretion1;
import com.microservice.microservicemovie.entity.User;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 *  Feign 调用 User 微服务客户端
 *      使用默认配置（FeignConfiguretion）访问 microservice-user 服务
 *
 * Created by bf on 2017/11/14.
 */
@FeignClient(name = "microservice-user", configuration = FeignConfiguretion1.class)
public interface UserClient {

    /**
     *  Feign 默认方式启动，注意注解的使用方式
     *  默認方式的或者URL  參數的注解 為 @param
     * @param id
     * @return
     */
    @RequestLine("GET /getuser/{id}")
    User getUser(@Param("id") Long id);


}
